{include file='pub/header'/}
<title>会员列表</title>
</head>
<body>
<nav class="breadcrumb">{$breadNav} <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
                                       href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <form action="" method="get">
        <div class="text-c"> 注册日期：
            <input type="text" autocomplete="off" onfocus="WdatePicker({maxDate:'#F{ $dp.$D(\'datemax\')}'})" id="datemin" name="mintime"
                   class="input-text Wdate" style="width:120px;">
            -
            <input type="text" autocomplete="off" onfocus="WdatePicker({minDate:'#F{ $dp.$D(\'datemin\')}'})" id="datemax" name="maxtime"
                   class="input-text Wdate" style="width:120px;">
            <input type="text" class="input-text" autocomplete="off" style="width:250px" placeholder="输入会员/手机号名称" name="uname">
            <button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜会员
            </button>
        </div>
    </form>
    <!--<div class="cl pd-5 bg-1 bk-gray mt-20">-->
		<!--<span class="l">-->
            <!--<a class="btn btn-primary radius" href="javascript:;" onclick="downloadMember()"><i class="Hui-iconfont">&#xe641;</i>下载会员</a>-->
		<!--</span>-->
    <!--</div>-->
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr>
            <th scope="col" colspan="9">会员列表</th>
        </tr>
        <tr class="text-c">
            <th>ID</th>
            <th>会员名</th>
            <th>手机号</th>
            <th>注册时间</th>
            <th>注册来源</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $v}
        <tr class="text-c">
            <td>{$v.id}</td>
            <td>{$v.user_name}</td>
            <td>{$v.telephone}</td>
            <td>{$v.create_time}</td>
            <td>
                {if $v.register_src eq 1}
                安卓
                {elseif $v.register_src eq 2}
                苹果
                {elseif $v.register_src eq 3}
                小程序
                {else}
                未知
                {/if}
            </td>
            <td>
                <a href="javascript:;" class="" onclick="userDetail1('{$v.id}')"><i class="Hui-iconfont Hui-iconfont-list"></i>查看详情</a>

                <a href="javascript:;" class="" onclick="userDetail('收获地址', '{$v.id}', 1)"><i class="Hui-iconfont Hui-iconfont-list"></i>收获地址</a>
                <a href="javascript:;" class="" onclick="userDetail('登录记录', '{$v.id}', 2)"><i class="Hui-iconfont Hui-iconfont-list"></i>登录记录</a>
                <a href="javascript:;" class="" onclick="userDetail('搜索记录', '{$v.id}', 3)"><i class="Hui-iconfont Hui-iconfont-list"></i>搜索记录</a>
                <br>
                <a href="javascript:;" class="" onclick="userDetail('查看产品记录', '{$v.id}', 4)"><i class="Hui-iconfont Hui-iconfont-list"></i>查看产品记录</a>
                <a href="javascript:;" class="" onclick="userDetail('订单情况', '{$v.id}', 5)"><i class="Hui-iconfont Hui-iconfont-list"></i>订单情况</a>
                <a href="javascript:;" class="" onclick="userDetail('跟单情况', '{$v.id}', 6)"><i class="Hui-iconfont Hui-iconfont-list"></i>跟单情况</a>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {$list->render()}
</div>
{include file="pub/footer"/}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">

    function userDetail(title ,id, status){
        window.parent.layer_show(title, '{:url("userDetail")}?id='+id+'&status='+status);
    }

    function userDetail1(id){
        layer_show('客户详情', '{:url("userDetail")}?id='+id);
    }
    // $(function () {
    //     $("table").dataTable({
    //         paging:false,
    //         totalNum:false
    //     });
    // })
    //下载会员信息
    function downloadMember() {
        layer_show('下载订单', "{:url('Member/downloadMember')}", '350', '300');
    }
</script>
</body>
</html>